home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / flamoot / essai1.asm < prev    next >
Encoding:
Assembly Source File  |  1994-11-01  |  1021 b   |  69 lines

  1. ;****************************************
  2. ;* ASM example to use FLamoot VGA SetUp *
  3. ;****************************************
  4.  
  5. .MODEL SMALL
  6.  
  7. .STACK 256
  8.  
  9. .DATA
  10.  
  11.  INCLUDE VIDEO.INC
  12.  
  13. Table dw m360x480x256p,m160x100x256c,m720x480x16p,m320x200x16c,m256x256x256c
  14.       dw m1440x480x4c,m720x480x16c
  15. TLen  EQU ($-(OFFSET Table))/2
  16.  
  17. .CODE
  18. .386
  19.  
  20. .STARTUP
  21.  
  22.  mov   si,OFFSET Table
  23.  mov   cx,TLen
  24.  
  25. Looper: 
  26.  push  cx
  27.  
  28.  REPT  10          ; wait VRT
  29.  VSYNC
  30.  ENDM
  31.  
  32.  lodsw
  33.  push  ax          ; push mode no ... 
  34.  
  35.  call _SetVGA
  36.  add   sp,2        ; becoze of C call ...
  37.  
  38.  mov   ax,0a000h
  39.  mov   es,ax
  40.  xor   di,di
  41.  xor   eax,eax
  42.  mov   cx,65536/4
  43. @@:
  44.  stosd
  45.  add   eax,01010101h 
  46.  dec   cx
  47.  jnz   @B
  48.  
  49. @@:
  50.  in    al,60h      ; wait until keypressed
  51.  cmp   al,39h
  52.  jnz   @B
  53.  
  54.  mov   ax,40h      ; flush keyboard buffer
  55.  mov   es,ax
  56.  mov   ax,es:[001ah]
  57.  mov   es:[001ch],ax
  58.  
  59.  pop   cx
  60.  dec   cx
  61.  jnz   Looper
  62.  
  63.  mov   ax,3        ; back to text mode 
  64.  int   10h
  65.  
  66. .EXIT
  67.  
  68.  END
  69.